package mt.client.GUI;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JTabbedPane;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JButton;
import javax.swing.JList;

public class OrderHistoryGUI extends JFrame {

	private JPanel contentPane;
	private JList listSoldHistory;
	private JList listBoughtHistory;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					OrderHistoryGUI frame = new OrderHistoryGUI();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public OrderHistoryGUI() {
		setTitle("Order History");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
		
		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		contentPane.add(tabbedPane, BorderLayout.CENTER);
		
		JPanel tabBought = new JPanel();
		tabbedPane.addTab("Bought", null, tabBought, null);
		tabBought.setLayout(new BorderLayout(0, 0));
		
		JScrollPane scrollPaneBought = new JScrollPane();
		tabBought.add(scrollPaneBought);
		
		listBoughtHistory = new JList();
		scrollPaneBought.setViewportView(listBoughtHistory);
		
		JPanel tabSold = new JPanel();
		tabSold.setToolTipText("");
		tabbedPane.addTab("Sold", null, tabSold, null);
		tabSold.setLayout(new BorderLayout(0, 0));
		
		JScrollPane scrollPaneSold = new JScrollPane();
		tabSold.add(scrollPaneSold);
		
		listSoldHistory = new JList();
		scrollPaneSold.setViewportView(listSoldHistory);
	}
}
